<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>39 | 计划大纲</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords"
	content="Modern Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template, 
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
<script type="application/x-javascript">
	
	 addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } 

</script>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<!-- Graph CSS -->
<link href="css/lines.css" rel='stylesheet' type='text/css' />
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<script src="js/jquery.min.js"></script>
<!-- Nav CSS -->
<link href="css/custom.css" rel="stylesheet">
<!-- Metis Menu Plugin JavaScript -->
<script src="js/metisMenu.min.js"></script>
<script src="js/custom.js"></script>
<!-- Graph JavaScript -->
<script src="js/d3.v3.js"></script>
<script src="js/rickshaw.js"></script>
<script>
	function getNodeDetail(id) {
		var newWindow = null;
		if (newWindow == null || newWindow.closed) {
			openUrl = "nodeDetail?opcode=getNodeDetailOutline&node_id=" + id;
			var width = 900;
			var height = 690;
			var left = parseInt((screen.availWidth / 2) - (width / 2));
			var top = parseInt((screen.availHeight / 2) - (height / 2));
			var windowFeatures = "width="
					+ width
					+ ",height="
					+ height
					+ ",status=no,resizable=0,scrollbars=0,titlebar=0,toolbar=0,location=no,menubar=0,left="
					+ left + ",top=" + top + "screenX=" + left + ",screenY="
					+ top;
			newWindow = window.open(openUrl, "node_update_subWind",
					windowFeatures);
		} else {
			newWindow.focus();
		}
	}
</script>
</head>
<body>
	<div id="wrapper">
		<!-- Navigation -->

		<!-- left.jsp -->
		<jsp:include page="left.jsp"></jsp:include>


		<div id="page-wrapper">

			<div class="xs">
				<div class="well1 white">
					<h1 align="center">计划大纲</h1>

					<div align="left">
						<form action="findSpecialNodes" method="post">
							<table class="table">
								<tr>
									<td>所领导： <select name="leader">
											<option value="">请选择所领导</option>
											<c:forEach items="${userList }" var="l">
												<c:if test="${l.role.id == 1 }">
													<option value="${l.id }">${l.user_name }</option>
												</c:if>
											</c:forEach>
									</select></td>
									<td>计划部分管领导: <select name="projectManager">
											<option value="">请选择分管领导</option>
											<c:forEach items="${userList }" var="manager">
												<c:if test="${manager.role.id == 3 }">
													<option value="${manager.id }">${manager.user_id}：
														${manager.user_name }</option>
												</c:if>
											</c:forEach>
									</select></td>
									<td>计划部项目主管： <select name="cpdPs">
											<option value="">请选择项目主管</option>
											<c:forEach items="${userList }" var="cpd">
												<c:if test="${cpd.role.id == 2 }">
													<option value="${cpd.id }">${cpd.user_id}：
														${cpd.user_name }</option>
												</c:if>
											</c:forEach>
									</select></td>
								</tr>
								<tr>
									<td>部门： <select name="headDept">
											<option value="">请选择牵头单位</option>
											<c:forEach items="${deptList }" var="d">
												<option value="${d.id }">${d.dept_name }</option>
											</c:forEach>
									</select></td>
									<td>目前状态： <select name="projectStatus">
											<option value="">请选择项目当前状态</option>
											<option value="0">在研</option>
											<option value="1">收款</option>
											<option value="2">结束</option>
									</select></td>
									<td>项目类型： <select name="projectType">
											<option value="">请选择项目类型</option>
											<c:forEach items="${typeList }" var="f">
												<option value="${f.id }">${f.protype_name }</option>
											</c:forEach>
									</select></td>
								</tr>
								<tr>
									<td>输入令号：<input type="text" name="projectCode" value="" />
									</td>
									<td>筛选时间 <input type="date" name="startTime" /> 至 <input
										type="date" name="endTime" /></td>
									<td><input type="submit" class="btn btn-primary"
										value="查询" />
									</td>
								</tr>
							</table>
						</form>
					</div>

					<table class="table">
						<tr>
							<th>项目令号</th>
							<th>项目名称</th>
							<th>节点</th>
						</tr>
						<c:forEach items="${projectList }" var="p">
							<tr>
								<td>${p.project_code }</td>
								<td>${p.project_name }</td>
								<td>
									<table class="table">
										<tr>
											<th>相关节点</th>
											<th>节点完成情况</th>
											<th>操作</th>
										</tr>

										<c:set var="flag" value="true" />
										<c:forEach items="${nodeList }" var="n">
											<c:if test="${n.firstplan.project.id == p.id }">
												<c:choose>
													<c:when test="${n.firstplan.plan_release == 1 }">
														<tr>
															<td>${n.node_describe }</td>
															<td>${n.status == 0 ? "未完成" : "已完成"}</td>
															<td><a href="#" onclick="getNodeDetail(${n.id });">查看节点</a>
															</td>
														</tr>
													</c:when>
													<c:when test="${flag and n.firstplan.plan_release == 0}">
														<tr>
															<td colspan="3" align="center">该项目的一级计划暂未创建/发布</td>
															<c:set var="flag" value="false" />
														</tr>
													</c:when>
												</c:choose>
											</c:if>
										</c:forEach>
									</table></td>
							</tr>
						</c:forEach>
					</table>

				</div>
			</div>




			<!-- copyright -->



			<jsp:include page="copyright.jsp"></jsp:include>

		</div>
	</div>
	<!-- /#page-wrapper -->
	</div>
	<!-- /#wrapper -->
	<!-- Bootstrap Core JavaScript -->
	<script src="js/bootstrap.min.js"></script>
</body>
</html>